﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AdminSite.Master"
    Inherits="System.Web.Mvc.ViewPage<object>" %>

<%@ Import Namespace="Veteran_cms.Models" %>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <!-- Validation form -->
    <%using (Html.BeginForm("Details", "ManageEvent", new { id = (Model as @event).event_id }, FormMethod.Post, new { enctype = "multipart/form-data", @class = "form", id = "validate" }))
      { %>
    <!-- Multiple files uploader -->
    <fieldset>
        <div>
            <div class="widget">
                <div style="float: right">
                    <a href="<%=Url.Action("IndexEvents","ManageEvent") %>" title="" class="button greenNum"
                        style="margin: 5px;">
                        <img src="../../images/adminSite/icons/prev.png" alt="" class="icon" /><span>Trở về</span></a></div>
                <div style="float: right">
                    <a href="<%=Url.Action("Create","ManageEvent") %>" title="" class="button greenNum"
                        style="margin: 5px;">
                        <img src="../../images/adminSite/icons/dark/add.png" alt="" class="icon" /><span>THÊM
                            MỚI</span></a></div>
            </div>
            <div class="title">
                <img src="../../Images/adminSite/icons/dark/pencil.png" alt="" class="titleIcon" /><h6>
                    Thông tin sự kiện</h6>
            </div>
            <%if (ViewData["Msg"] != null)
              {%>
            <div class="nNote nSuccess hideit">
                <p>
                    <strong>
                        <%=ViewData["Msg"]%></strong></p>
            </div>
            <%} %>
            <div class="formRow">
                <label>
                    Tiêu đề:<span class="req">*</span></label>
                <div class="formRight">
                    <%:Html.TextBoxFor(model => (model as @event).title, new { @class = "validate[required,maxSize[255]]", id = "req" })%></div>
                <div class="clear">
                </div>
            </div>
            <div class="formRow">
                <label>
                    Sơ lược:<span class="req">*</span></label>
                <div class="formRight">
                    <%:Html.TextAreaFor(model => (model as @event).sub_title, new { @class = "validate[required,maxSize[500]]", id = "textareaAutoGrow", rows = "4", cols = "" })%></div>
                <div class="clear">
                </div>
            </div>
            <div class="formRow">
                <label>
                    Diễn giải:<span class="req">*</span></label>
                <div class="formRight">
                    <%:Html.TextAreaFor(model => (model as @event).description, new { @class = "validate[required,maxSize[500]]", id = "textareaAutoGrow", rows = "4", cols = "" })%></div>
                <div class="clear">
                </div>
            </div>
            <div class="formRow">
                <label>
                    Nội dung:<span class="req">*</span></label>
                <div class="formRight">
                    <%:Html.TextAreaFor(model => (model as @event).content, new { @class = "validate[required]", id = "editor", name = "editor" })%></div>
                <div class="clear">
                </div>
            </div>
            <div class="formRow">
                <label>
                    Địa điểm:<span class="req">*</span></label>
                <div class="formRight">
                    <%:Html.TextBoxFor(model => (model as @event).location, new { @class = "validate[required,maxSize[500]]", id = "req" })%></div>
                <div class="clear">
                </div>
            </div>
            <div class="formRow">
                <label>
                    Thời gian:<span class="req">*</span></label>
                <div class="formRight">
                    <%=Html.TextBoxFor(mode => (mode as @event).event_date, new { @class = "validate[required]", id = "datepicker", name = "datepicker", @readonly = "readonly", Value = String.Format("{0:d}", (Model as @event).event_date) })%>
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="formRow">
                <label for="check1">
                    Ngày sự kiện</label>
                <div class="formRight">
                    <%=Html.TextBoxFor(mode => (mode as @event).event_date, new { @class = "validate[required]", id = "datepicker", name = "datepicker", @readonly = "readonly" })%>
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="formRow">
                <label>
                    Đối tượng:<span class="req">*</span></label>
                <div class="formRight">
                    <%:Html.TextBoxFor(model => (model as @event).object_joint, new { @class = "validate[required,maxSize[50]]", id = "req" })%></div>
                <div class="clear">
                </div>
            </div>
            <div class="formRow">
                <label>
                    Hình ảnh large:<span class="req">(353x258)*</span></label>
                <div class="formRight">
                    <img src="<%=(Model as @event).image_large %>" alt="<%=(Model as @event).title%>" /></div>
                <div class="formRight">
                    <input type="file" id="file1" name="uploadFile" /></div>
                <div class="clear">
                </div>
            </div>
            <div class="formRow">
                <div class="formRight">
                    <%=Html.CheckBoxFor(mode=>(mode as @event).visible) %><label for="check1">Hiển thị</label>
                </div>
                <div class="clear">
                </div>
            </div>
        </div>
        <div class="widget">
            <%using (Html.BeginForm("Delete", "ManageEvent", new { id = (Model as @event).event_id }, FormMethod.Post, new { enctype = "multipart/form-data", @class = "form" }))
              { %>
            <div class="formSubmit">
                <input type="submit" value="Xóa" class="redB" /></div>
            <%} %>
            <div class="formSubmit">
                <input type="submit" value="Cập nhật" class="blueB" /></div>
            <%} %>
            <div class="clear">
            </div>
            <div>
                <%:Html.HiddenFor(model => (model as @event).event_id)%></div>
        </div>
    </fieldset>
</asp:Content>
